new Vue({
    data: {
        avatarUrl: 'img\\1.png', // 设置为本地图片路径
        activeIndex: '1',
        name: 'MinorArea',
        name: 'Achievements',
        isActive: true,// 根据实际情况设置是否激活
        stats: [
            { title: '文章被点赞', iconClass: 'zan', count: 1 },
            { title: '文章被阅读', iconClass: 'stat-view-icon', count: 5 },
            { title: '掘力值', iconClass: 'stat-jp-icon', count: 12 }
        ]

    },
    methods: {
        handleFileChange(e) {
            let files = e.target.files || e.dataTransfer.files;
            if (!files.length)
                return;

            this.createImage(files[0]);
        },
        createImage(file) {
            let reader = new FileReader();
            let vm = this;

            reader.onload = (e) => {
                vm.avatarUrl = e.target.result;
            };
            reader.readAsDataURL(file);
        },
        triggerFileInput() {
            this.$refs.fileInput.click();
        },
        goToProfileSettings() {
            // 假设使用 Vue Router
            this.$router.push({ name: 'ProfileSettings' }); // 替换 'ProfileSettings' 为你的路由名称
        },
        handleSelect(key, keyPath) {
            console.log(key, keyPath);
        }
    },
}).$mount("#app");